package com.work8;

import java.util.HashSet;
import java.util.Set;

public class Test {
    public static void main(String[] args) {

            Set<Person> set = new HashSet<>();
            set.add(new Person(154,"zhaoliu"));
            set.add(new Person(101,"zhangsan"));
            set.add(new Person(101,"zhangsan"));
            set.add(new Person(133,"wangwu"));
            set.add(new Person(115,"zhangsan"));
            set.add(new Person(115,"zhangsan"));
            set.add(new Person(112,"lisi"));
            System.out.println(set.size());
            // set集合中，最终会有几个元素？为什么？

    }
}
